<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2019 http://www.thinkcmf.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 老猫 <thinkcmf@126.com>
// +----------------------------------------------------------------------
namespace app\portal\controller;

use cmf\controller\HomeBaseController;

class ProductController extends HomeBaseController
{
    public function index()
    {
    	$product=db('product')
    	->where(['status'=>1])
    	->order('list_order desc,id desc')
    	->paginate(8,false,['query' => request()->param()]);
    	
    	
    	
    	$this->assign('product',$product->items());
    	$this->assign('page', $product->render());
        return $this->fetch();
    }
}
